package book;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: wwy
 * Date: 2024-09-03
 * Time: 22:21
 */
public class BookList {
    private Book[] book=new Book[10];
    private int usedSize;//实际个数.
    public BookList(){
        book[0]=new Book("三国演义","罗贯中",10,"小说");
        book[1]=new Book("西游记","吴承恩",59,"小说");
        book[2]=new Book("红楼梦","曹雪芹",16,"小说");
        this.usedSize=3;
    }

    public int getUsedSize() {
        return usedSize;
    }

    public Book getBook(int pos) {
        return book[pos];
    }

    public void setBook(int pos,Book book) {
        this.book[pos]=book;
    }

    public void setUsedSize(int usedSize) {
        this.usedSize = usedSize;
    }
    public Book[] getBooks(){
        return book;
    }
}
